/***************************************************************************
 *   Copyright (C) 2007 by Alexandre Masselot,,,   *
 *   alex@alex-laptop   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU Library General Public License as       *
 *   published by the Free Software Foundation; either version 2 of the    *
 *   License, or (at your option) any later version.                       *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU Library General Public     *
 *   License along with this program; if not, write to the                 *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/
#ifndef PEPTIDEMSMSFACTORY_H
#define PEPTIDEMSMSFACTORY_H
#include "peptidefactory.h"
#include <iostream>
#include <vector>

/**
a factory to transform a peptide into a list of peptides with positioned modifs (unlike pmf peptides, where modif numbers are returned but not their positions

	@author Alexandre Masselot,,, <alex@alex-laptop>
*/
using namespace std;

namespace bol{
class PeptideMSMSFactory: public PeptideFactory{
private:
  /*
    aacycle depends on the peptidemodifier
    the peptide modifier defines how an amino acid can be declined
    for example
    a)where Cysteine has 2 variable modification: C(4h) -> 4h,31h,32h)
      aacyclestart[4h]=4h
      aacycle[4h]=31h
      aacycle[31h]=32h
      aacycle[32h]=4h
    b) where Cysteine has the same modif, but as fixed
      aacyclestart[4h]=31h
      aacycle[31h]=32h
      aacycle[32h]=31h
    c) where Cysteine has only on fix modif
      aacyclestart[4h]=31h
      aacycle[31h]=31h
    d) where Cysteine has no modif
      aacyclestart[4h]=4h
      aacycle[4h]=4h

      we notice that, from the peptimodifier construction, when a aacyle value is lower or equal to the index, it means that the loop has been done through the computations
  */
  unsigned char aacyclestart[256];
  unsigned char aacycle[256];

public:
  PeptideMSMSFactory(){}

  ~PeptideMSMSFactory(){}

  unsigned char *aaCycleStart() {
    return aacyclestart;
  }
  unsigned char *aaCycle() {
    return aacycle;
  }

    void createPeptides(Peptide& src, vector<Peptide>& vpept);

    void setPeptideModifier(PeptideModifier* theValue);
  
  

};
}
#endif
